class LocationChanges < ActiveRecord::Migration
  def self.up
    change_table :cities do |t|
      t.remove :name
      t.string :name, :null => false
    end

    change_table :countries do |t|
      t.remove :name
      t.string :name, :null => false
    end

    #Add foreign keys to artist
    add_foreign_key(:artists, :cities, :column => :city_id)
    add_foreign_key(:artists, :countries, :column => :country_id)
  end

  def self.down
    remove_foreign_key(:artists, :column => :city_id)
    remove_foreign_key(:artists, :column => :country_id)
  end
end
